package com.warm.pump.module.work.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.work.bean.po.gen.WorVersion;
import com.warm.pump.module.work.mapper.gen.WorVersionMapper;
import com.warm.pump.module.work.bean.po.gen.WorVersionExample;
@Repository
public class WorVersionDao {
	// 日志对象
	private transient Log log = LogFactory.getLog(this.getClass());
	@Autowired
	private WorVersionMapper worVersionMapper;

	// 增加一个后台WorVersion表
	
	public boolean insert(WorVersion worVersion) {
		try {
			worVersionMapper.insert(worVersion);
			log.debug("后台WorVersion表增加成功");
			return true;
		} catch (Exception e) {
			log.debug("后台WorVersion表增加失败");
			throw new ServiceException("后台WorVersion表增加失败",e);
		}
	}
	// 增加一个后台WorVersion表Selective
	
	public boolean insertSelective(WorVersion worVersion) {
		try {
			worVersionMapper.insertSelective(worVersion);
			log.debug("后台WorVersion表增加成功");
			return true;
		} catch (Exception e) {
			log.debug("后台WorVersion表增加失败");
			throw new ServiceException("后台WorVersion表增加失败",e);
		}
	}

	// 删除一个后台WorVersion表
	
	public boolean deleteByPrimaryKey(Long id) {
		try{
			worVersionMapper.deleteByPrimaryKey(id);
			log.debug("后台WorVersion表删除成功");
			return true;
		} catch(Exception e){
			log.debug("后台WorVersion表删除失败");
			throw new ServiceException("后台WorVersion表删除失败",e);
		}
	}
	// 删除一个后台WorVersion表byMap
	
	public boolean deleteByMap(Map worVersionMap) {
		try{
			worVersionMapper.deleteByExample(createWorVersionExample(worVersionMap,null,null));
			log.debug("后台WorVersion根据Map删除成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台WorVersion根据GroupID删除失败");
			throw new ServiceException("后台WorVersion根据object删除失败",e);
		}
	}
	// 修改一个后台WorVersion表
	
	public boolean updateByPrimaryKey(WorVersion worVersion) {
		try{
			worVersionMapper.updateByPrimaryKey(worVersion);
			log.debug("后台WorVersion表修改成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台WorVersion表修改失败");
			throw new ServiceException("后台WorVersion表修改失败",e);
		}
	}
	// 修改一个后台WorVersion表Selective
	
	public boolean updateByPrimaryKeySelective(WorVersion worVersion) {
		try{
			worVersionMapper.updateByPrimaryKeySelective(worVersion);
			log.debug("后台WorVersion表修改成功");
			return true;
		}
		
		catch(Exception e){
			log.debug("后台WorVersion表修改失败");
			throw new ServiceException("后台WorVersion表修改失败",e);
		}
	}
	// 修改一个后台WorVersion表
	
	public boolean updateByMap(WorVersion worVersion,Map worVersionMap) {
		try{
			worVersionMapper.updateByExample(worVersion,createWorVersionExample(worVersionMap,null,null));
			log.debug("后台批量WorVersion表修改成功");
			return true;
		}
		catch(Exception e){
			log.debug("后台批量WorVersion表修改失败");
			throw new ServiceException("后台WorVersion表批量修改失败",e);
		}
	}
	// 修改一个后台WorVersion表Selective
	
	public boolean updateByMapSelective(WorVersion worVersion,Map worVersionMap) {
		try{
			worVersionMapper.updateByExampleSelective(worVersion,createWorVersionExample(worVersionMap,null,null));
			log.debug("后台批量WorVersion表修改成功");
			return true;
		}
		catch(Exception e){
			log.debug("后台批量WorVersion表修改失败");
			throw new ServiceException("后台WorVersion表批量修改失败",e);
		}
	}

	// 查询一个后台WorVersion表
	
	public WorVersion selectByPrimaryKey(Long id) {
		return worVersionMapper.selectByPrimaryKey(id);
	}
	
	// 查询一个后台WorVersion表-根据map
	
	public WorVersion selectByMap(Map worVersionMap) {
		List<WorVersion> list = getListByMap(worVersionMap);
		if(list==null||list.isEmpty()){
			return null;
		}else{
			return list.get(0);
		}
	}

	////////////////////////////////////////////////////////////////////////////////////////////////////////
	// 查询所有后台WorVersion表
	
	public List<WorVersion> getListByMap(Map worVersionMap) {
		
		return worVersionMapper.selectByExample(createWorVersionExample(worVersionMap,null,null));
	}

	//统计后台WorVersion表数量
	
	public int countTotalByMap(Map worVersionMap) {
		
		return worVersionMapper.countByExample(createWorVersionExample(worVersionMap,null,null));
	}

	
	public List<WorVersion> getListByMapPage(Map worVersionMap, int limitStart,
			int limitOffset) {
		
		return worVersionMapper.selectByExample(createWorVersionExample(worVersionMap,limitStart,limitOffset));
	}
	
	
	public PageBean getPageBeanByMap(Map worVersionMap,int pageNo,int pageSize) {
		Integer count = countTotalByMap(worVersionMap);
		PageBean pageBean = new PageBean();
		pageBean.setCount(count);
		pageBean.setPageNo(pageNo);
		pageBean.setPageSize(pageSize);
		int limitStart = pageBean.getStartNo();
		int limitOffset = pageSize;
		pageBean.setData(worVersionMapper.selectByExample(createWorVersionExample(worVersionMap,limitStart,limitOffset)));
		return pageBean;
	}
		
	private WorVersionExample createWorVersionExample(Map worVersionMap,Integer limitStart,Integer limitOffset){
			WorVersionExample worVersionEx = new WorVersionExample();
			WorVersionExample.Criteria c = worVersionEx.createCriteria();
				Long id_null = TypeCast.getLong(worVersionMap.get("id_null"));
				Long id_notNull = TypeCast.getLong(worVersionMap.get("id_notNull"));
				Long id = TypeCast.getLong(worVersionMap.get("id"));
				Long id_not = TypeCast.getLong(worVersionMap.get("id_not"));
				Long id_greater = TypeCast.getLong(worVersionMap.get("id_greater"));
				Long id_greaterEqual = TypeCast.getLong(worVersionMap.get("id_greaterEqual"));
				Long id_less = TypeCast.getLong(worVersionMap.get("id_less"));
				Long id_lessEqual = TypeCast.getLong(worVersionMap.get("id_lessEqual"));
				List<Long> id_in = TypeCast.getLongList(worVersionMap.get("id_in"));
				List<Long> id_notIn = TypeCast.getLongList(worVersionMap.get("id_notIn"));
				Long id_between1 = TypeCast.getLong(worVersionMap.get("id_between1"));
				Long id_between2 = TypeCast.getLong(worVersionMap.get("id_between2"));
				Long id_notBetween1 = TypeCast.getLong(worVersionMap.get("id_notBetween1"));
				Long id_notBetween2 = TypeCast.getLong(worVersionMap.get("id_notBetween2"));
				
				if(id_null != null){
					c.andIdIsNull();
				}
				if(id_notNull != null){
					c.andIdIsNotNull();
				}
				if(id != null){
					c.andIdEqualTo(id);
				}
				if(id_not != null){
					c.andIdNotEqualTo(id_not);
				}
				if(id_greater != null){
					c.andIdGreaterThan(id_greater);
				}
				if(id_greaterEqual != null){
					c.andIdGreaterThanOrEqualTo(id_greaterEqual);
				}
				if(id_less != null){
					c.andIdLessThan(id_less);
				}
				if(id_lessEqual != null){
					c.andIdLessThanOrEqualTo(id_lessEqual);
				}
				if(id_in != null){
					c.andIdIn(id_in);
				}
				if(id_notIn != null){
					c.andIdNotIn(id_notIn);
				}
				if(id_between1 != null){
					c.andIdBetween(id_between1,id_between2);
				}
				if(id_notBetween1 != null){
					c.andIdNotBetween(id_notBetween1,id_notBetween2);
				}
				String versionCode_null = TypeCast.getString(worVersionMap.get("versionCode_null"));
				String versionCode_notNull = TypeCast.getString(worVersionMap.get("versionCode_notNull"));
				String versionCode = TypeCast.getString(worVersionMap.get("versionCode"));
				String versionCode_not = TypeCast.getString(worVersionMap.get("versionCode_not"));
				String versionCode_greater = TypeCast.getString(worVersionMap.get("versionCode_greater"));
				String versionCode_greaterEqual = TypeCast.getString(worVersionMap.get("versionCode_greaterEqual"));
				String versionCode_less = TypeCast.getString(worVersionMap.get("versionCode_less"));
				String versionCode_lessEqual = TypeCast.getString(worVersionMap.get("versionCode_lessEqual"));
				String versionCode_like = TypeCast.getString(worVersionMap.get("versionCode_like"));
				String versionCode_notLike = TypeCast.getString(worVersionMap.get("versionCode_notLike"));
				List<String> versionCode_in = TypeCast.getStringList(worVersionMap.get("versionCode_in"));
				List<String> versionCode_notIn = TypeCast.getStringList(worVersionMap.get("versionCode_notIn"));
				String versionCode_between1 = TypeCast.getString(worVersionMap.get("versionCode_between1"));
				String versionCode_between2 = TypeCast.getString(worVersionMap.get("versionCode_between2"));
				String versionCode_notBetween1 = TypeCast.getString(worVersionMap.get("versionCode_notBetween1"));
				String versionCode_notBetween2 = TypeCast.getString(worVersionMap.get("versionCode_notBetween2"));
				
				if(versionCode_null != null){
					c.andVersionCodeIsNull();
				}
				if(versionCode_notNull != null){
					c.andVersionCodeIsNotNull();
				}
				if(versionCode != null){
					c.andVersionCodeEqualTo(versionCode);
				}
				if(versionCode_not != null){
					c.andVersionCodeNotEqualTo(versionCode_not);
				}
				if(versionCode_greater != null){
					c.andVersionCodeGreaterThan(versionCode_greater);
				}
				if(versionCode_greaterEqual != null){
					c.andVersionCodeGreaterThanOrEqualTo(versionCode_greaterEqual);
				}
				if(versionCode_less != null){
					c.andVersionCodeLessThan(versionCode_less);
				}
				if(versionCode_lessEqual != null){
					c.andVersionCodeLessThanOrEqualTo(versionCode_lessEqual);
				}
				if(versionCode_like != null){
					c.andVersionCodeLike(versionCode_like);
				}
				if(versionCode_notLike != null){
					c.andVersionCodeNotLike(versionCode_notLike);
				}
				if(versionCode_in != null){
					c.andVersionCodeIn(versionCode_in);
				}
				if(versionCode_notIn != null){
					c.andVersionCodeNotIn(versionCode_notIn);
				}
				if(versionCode_between1 != null){
					c.andVersionCodeBetween(versionCode_between1,versionCode_between2);
				}
				if(versionCode_notBetween1 != null){
					c.andVersionCodeNotBetween(versionCode_notBetween1,versionCode_notBetween2);
				}
				String versionName_null = TypeCast.getString(worVersionMap.get("versionName_null"));
				String versionName_notNull = TypeCast.getString(worVersionMap.get("versionName_notNull"));
				String versionName = TypeCast.getString(worVersionMap.get("versionName"));
				String versionName_not = TypeCast.getString(worVersionMap.get("versionName_not"));
				String versionName_greater = TypeCast.getString(worVersionMap.get("versionName_greater"));
				String versionName_greaterEqual = TypeCast.getString(worVersionMap.get("versionName_greaterEqual"));
				String versionName_less = TypeCast.getString(worVersionMap.get("versionName_less"));
				String versionName_lessEqual = TypeCast.getString(worVersionMap.get("versionName_lessEqual"));
				String versionName_like = TypeCast.getString(worVersionMap.get("versionName_like"));
				String versionName_notLike = TypeCast.getString(worVersionMap.get("versionName_notLike"));
				List<String> versionName_in = TypeCast.getStringList(worVersionMap.get("versionName_in"));
				List<String> versionName_notIn = TypeCast.getStringList(worVersionMap.get("versionName_notIn"));
				String versionName_between1 = TypeCast.getString(worVersionMap.get("versionName_between1"));
				String versionName_between2 = TypeCast.getString(worVersionMap.get("versionName_between2"));
				String versionName_notBetween1 = TypeCast.getString(worVersionMap.get("versionName_notBetween1"));
				String versionName_notBetween2 = TypeCast.getString(worVersionMap.get("versionName_notBetween2"));
				
				if(versionName_null != null){
					c.andVersionNameIsNull();
				}
				if(versionName_notNull != null){
					c.andVersionNameIsNotNull();
				}
				if(versionName != null){
					c.andVersionNameEqualTo(versionName);
				}
				if(versionName_not != null){
					c.andVersionNameNotEqualTo(versionName_not);
				}
				if(versionName_greater != null){
					c.andVersionNameGreaterThan(versionName_greater);
				}
				if(versionName_greaterEqual != null){
					c.andVersionNameGreaterThanOrEqualTo(versionName_greaterEqual);
				}
				if(versionName_less != null){
					c.andVersionNameLessThan(versionName_less);
				}
				if(versionName_lessEqual != null){
					c.andVersionNameLessThanOrEqualTo(versionName_lessEqual);
				}
				if(versionName_like != null){
					c.andVersionNameLike(versionName_like);
				}
				if(versionName_notLike != null){
					c.andVersionNameNotLike(versionName_notLike);
				}
				if(versionName_in != null){
					c.andVersionNameIn(versionName_in);
				}
				if(versionName_notIn != null){
					c.andVersionNameNotIn(versionName_notIn);
				}
				if(versionName_between1 != null){
					c.andVersionNameBetween(versionName_between1,versionName_between2);
				}
				if(versionName_notBetween1 != null){
					c.andVersionNameNotBetween(versionName_notBetween1,versionName_notBetween2);
				}
				String remark_null = TypeCast.getString(worVersionMap.get("remark_null"));
				String remark_notNull = TypeCast.getString(worVersionMap.get("remark_notNull"));
				String remark = TypeCast.getString(worVersionMap.get("remark"));
				String remark_not = TypeCast.getString(worVersionMap.get("remark_not"));
				String remark_greater = TypeCast.getString(worVersionMap.get("remark_greater"));
				String remark_greaterEqual = TypeCast.getString(worVersionMap.get("remark_greaterEqual"));
				String remark_less = TypeCast.getString(worVersionMap.get("remark_less"));
				String remark_lessEqual = TypeCast.getString(worVersionMap.get("remark_lessEqual"));
				String remark_like = TypeCast.getString(worVersionMap.get("remark_like"));
				String remark_notLike = TypeCast.getString(worVersionMap.get("remark_notLike"));
				List<String> remark_in = TypeCast.getStringList(worVersionMap.get("remark_in"));
				List<String> remark_notIn = TypeCast.getStringList(worVersionMap.get("remark_notIn"));
				String remark_between1 = TypeCast.getString(worVersionMap.get("remark_between1"));
				String remark_between2 = TypeCast.getString(worVersionMap.get("remark_between2"));
				String remark_notBetween1 = TypeCast.getString(worVersionMap.get("remark_notBetween1"));
				String remark_notBetween2 = TypeCast.getString(worVersionMap.get("remark_notBetween2"));
				
				if(remark_null != null){
					c.andRemarkIsNull();
				}
				if(remark_notNull != null){
					c.andRemarkIsNotNull();
				}
				if(remark != null){
					c.andRemarkEqualTo(remark);
				}
				if(remark_not != null){
					c.andRemarkNotEqualTo(remark_not);
				}
				if(remark_greater != null){
					c.andRemarkGreaterThan(remark_greater);
				}
				if(remark_greaterEqual != null){
					c.andRemarkGreaterThanOrEqualTo(remark_greaterEqual);
				}
				if(remark_less != null){
					c.andRemarkLessThan(remark_less);
				}
				if(remark_lessEqual != null){
					c.andRemarkLessThanOrEqualTo(remark_lessEqual);
				}
				if(remark_like != null){
					c.andRemarkLike(remark_like);
				}
				if(remark_notLike != null){
					c.andRemarkNotLike(remark_notLike);
				}
				if(remark_in != null){
					c.andRemarkIn(remark_in);
				}
				if(remark_notIn != null){
					c.andRemarkNotIn(remark_notIn);
				}
				if(remark_between1 != null){
					c.andRemarkBetween(remark_between1,remark_between2);
				}
				if(remark_notBetween1 != null){
					c.andRemarkNotBetween(remark_notBetween1,remark_notBetween2);
				}
				Date versionDate_null = TypeCast.getDate(worVersionMap.get("versionDate_null"));
				Date versionDate_notNull = TypeCast.getDate(worVersionMap.get("versionDate_notNull"));
				Date versionDate = TypeCast.getDate(worVersionMap.get("versionDate"));
				Date versionDate_not = TypeCast.getDate(worVersionMap.get("versionDate_not"));
				Date versionDate_greater = TypeCast.getDate(worVersionMap.get("versionDate_greater"));
				Date versionDate_greaterEqual = TypeCast.getDate(worVersionMap.get("versionDate_greaterEqual"));
				Date versionDate_less = TypeCast.getDate(worVersionMap.get("versionDate_less"));
				Date versionDate_lessEqual = TypeCast.getDate(worVersionMap.get("versionDate_lessEqual"));
				List<Date> versionDate_in = TypeCast.getDateList(worVersionMap.get("versionDate_in"));
				List<Date> versionDate_notIn = TypeCast.getDateList(worVersionMap.get("versionDate_notIn"));
				Date versionDate_between1 = TypeCast.getDate(worVersionMap.get("versionDate_between1"));
				Date versionDate_between2 = TypeCast.getDate(worVersionMap.get("versionDate_between2"));
				Date versionDate_notBetween1 = TypeCast.getDate(worVersionMap.get("versionDate_notBetween1"));
				Date versionDate_notBetween2 = TypeCast.getDate(worVersionMap.get("versionDate_notBetween2"));
				
				if(versionDate_null != null){
					c.andVersionDateIsNull();
				}
				if(versionDate_notNull != null){
					c.andVersionDateIsNotNull();
				}
				if(versionDate != null){
					c.andVersionDateEqualTo(versionDate);
				}
				if(versionDate_not != null){
					c.andVersionDateNotEqualTo(versionDate_not);
				}
				if(versionDate_greater != null){
					c.andVersionDateGreaterThan(versionDate_greater);
				}
				if(versionDate_greaterEqual != null){
					c.andVersionDateGreaterThanOrEqualTo(versionDate_greaterEqual);
				}
				if(versionDate_less != null){
					c.andVersionDateLessThan(versionDate_less);
				}
				if(versionDate_lessEqual != null){
					c.andVersionDateLessThanOrEqualTo(versionDate_lessEqual);
				}
				if(versionDate_in != null){
					c.andVersionDateIn(versionDate_in);
				}
				if(versionDate_notIn != null){
					c.andVersionDateNotIn(versionDate_notIn);
				}
				if(versionDate_between1 != null){
					c.andVersionDateBetween(versionDate_between1,versionDate_between2);
				}
				if(versionDate_notBetween1 != null){
					c.andVersionDateNotBetween(versionDate_notBetween1,versionDate_notBetween2);
				}
				Long workId_null = TypeCast.getLong(worVersionMap.get("workId_null"));
				Long workId_notNull = TypeCast.getLong(worVersionMap.get("workId_notNull"));
				Long workId = TypeCast.getLong(worVersionMap.get("workId"));
				Long workId_not = TypeCast.getLong(worVersionMap.get("workId_not"));
				Long workId_greater = TypeCast.getLong(worVersionMap.get("workId_greater"));
				Long workId_greaterEqual = TypeCast.getLong(worVersionMap.get("workId_greaterEqual"));
				Long workId_less = TypeCast.getLong(worVersionMap.get("workId_less"));
				Long workId_lessEqual = TypeCast.getLong(worVersionMap.get("workId_lessEqual"));
				List<Long> workId_in = TypeCast.getLongList(worVersionMap.get("workId_in"));
				List<Long> workId_notIn = TypeCast.getLongList(worVersionMap.get("workId_notIn"));
				Long workId_between1 = TypeCast.getLong(worVersionMap.get("workId_between1"));
				Long workId_between2 = TypeCast.getLong(worVersionMap.get("workId_between2"));
				Long workId_notBetween1 = TypeCast.getLong(worVersionMap.get("workId_notBetween1"));
				Long workId_notBetween2 = TypeCast.getLong(worVersionMap.get("workId_notBetween2"));
				
				if(workId_null != null){
					c.andWorkIdIsNull();
				}
				if(workId_notNull != null){
					c.andWorkIdIsNotNull();
				}
				if(workId != null){
					c.andWorkIdEqualTo(workId);
				}
				if(workId_not != null){
					c.andWorkIdNotEqualTo(workId_not);
				}
				if(workId_greater != null){
					c.andWorkIdGreaterThan(workId_greater);
				}
				if(workId_greaterEqual != null){
					c.andWorkIdGreaterThanOrEqualTo(workId_greaterEqual);
				}
				if(workId_less != null){
					c.andWorkIdLessThan(workId_less);
				}
				if(workId_lessEqual != null){
					c.andWorkIdLessThanOrEqualTo(workId_lessEqual);
				}
				if(workId_in != null){
					c.andWorkIdIn(workId_in);
				}
				if(workId_notIn != null){
					c.andWorkIdNotIn(workId_notIn);
				}
				if(workId_between1 != null){
					c.andWorkIdBetween(workId_between1,workId_between2);
				}
				if(workId_notBetween1 != null){
					c.andWorkIdNotBetween(workId_notBetween1,workId_notBetween2);
				}
				Date createTime_null = TypeCast.getDate(worVersionMap.get("createTime_null"));
				Date createTime_notNull = TypeCast.getDate(worVersionMap.get("createTime_notNull"));
				Date createTime = TypeCast.getDate(worVersionMap.get("createTime"));
				Date createTime_not = TypeCast.getDate(worVersionMap.get("createTime_not"));
				Date createTime_greater = TypeCast.getDate(worVersionMap.get("createTime_greater"));
				Date createTime_greaterEqual = TypeCast.getDate(worVersionMap.get("createTime_greaterEqual"));
				Date createTime_less = TypeCast.getDate(worVersionMap.get("createTime_less"));
				Date createTime_lessEqual = TypeCast.getDate(worVersionMap.get("createTime_lessEqual"));
				List<Date> createTime_in = TypeCast.getDateList(worVersionMap.get("createTime_in"));
				List<Date> createTime_notIn = TypeCast.getDateList(worVersionMap.get("createTime_notIn"));
				Date createTime_between1 = TypeCast.getDate(worVersionMap.get("createTime_between1"));
				Date createTime_between2 = TypeCast.getDate(worVersionMap.get("createTime_between2"));
				Date createTime_notBetween1 = TypeCast.getDate(worVersionMap.get("createTime_notBetween1"));
				Date createTime_notBetween2 = TypeCast.getDate(worVersionMap.get("createTime_notBetween2"));
				
				if(createTime_null != null){
					c.andCreateTimeIsNull();
				}
				if(createTime_notNull != null){
					c.andCreateTimeIsNotNull();
				}
				if(createTime != null){
					c.andCreateTimeEqualTo(createTime);
				}
				if(createTime_not != null){
					c.andCreateTimeNotEqualTo(createTime_not);
				}
				if(createTime_greater != null){
					c.andCreateTimeGreaterThan(createTime_greater);
				}
				if(createTime_greaterEqual != null){
					c.andCreateTimeGreaterThanOrEqualTo(createTime_greaterEqual);
				}
				if(createTime_less != null){
					c.andCreateTimeLessThan(createTime_less);
				}
				if(createTime_lessEqual != null){
					c.andCreateTimeLessThanOrEqualTo(createTime_lessEqual);
				}
				if(createTime_in != null){
					c.andCreateTimeIn(createTime_in);
				}
				if(createTime_notIn != null){
					c.andCreateTimeNotIn(createTime_notIn);
				}
				if(createTime_between1 != null){
					c.andCreateTimeBetween(createTime_between1,createTime_between2);
				}
				if(createTime_notBetween1 != null){
					c.andCreateTimeNotBetween(createTime_notBetween1,createTime_notBetween2);
				}
				Date updateTime_null = TypeCast.getDate(worVersionMap.get("updateTime_null"));
				Date updateTime_notNull = TypeCast.getDate(worVersionMap.get("updateTime_notNull"));
				Date updateTime = TypeCast.getDate(worVersionMap.get("updateTime"));
				Date updateTime_not = TypeCast.getDate(worVersionMap.get("updateTime_not"));
				Date updateTime_greater = TypeCast.getDate(worVersionMap.get("updateTime_greater"));
				Date updateTime_greaterEqual = TypeCast.getDate(worVersionMap.get("updateTime_greaterEqual"));
				Date updateTime_less = TypeCast.getDate(worVersionMap.get("updateTime_less"));
				Date updateTime_lessEqual = TypeCast.getDate(worVersionMap.get("updateTime_lessEqual"));
				List<Date> updateTime_in = TypeCast.getDateList(worVersionMap.get("updateTime_in"));
				List<Date> updateTime_notIn = TypeCast.getDateList(worVersionMap.get("updateTime_notIn"));
				Date updateTime_between1 = TypeCast.getDate(worVersionMap.get("updateTime_between1"));
				Date updateTime_between2 = TypeCast.getDate(worVersionMap.get("updateTime_between2"));
				Date updateTime_notBetween1 = TypeCast.getDate(worVersionMap.get("updateTime_notBetween1"));
				Date updateTime_notBetween2 = TypeCast.getDate(worVersionMap.get("updateTime_notBetween2"));
				
				if(updateTime_null != null){
					c.andUpdateTimeIsNull();
				}
				if(updateTime_notNull != null){
					c.andUpdateTimeIsNotNull();
				}
				if(updateTime != null){
					c.andUpdateTimeEqualTo(updateTime);
				}
				if(updateTime_not != null){
					c.andUpdateTimeNotEqualTo(updateTime_not);
				}
				if(updateTime_greater != null){
					c.andUpdateTimeGreaterThan(updateTime_greater);
				}
				if(updateTime_greaterEqual != null){
					c.andUpdateTimeGreaterThanOrEqualTo(updateTime_greaterEqual);
				}
				if(updateTime_less != null){
					c.andUpdateTimeLessThan(updateTime_less);
				}
				if(updateTime_lessEqual != null){
					c.andUpdateTimeLessThanOrEqualTo(updateTime_lessEqual);
				}
				if(updateTime_in != null){
					c.andUpdateTimeIn(updateTime_in);
				}
				if(updateTime_notIn != null){
					c.andUpdateTimeNotIn(updateTime_notIn);
				}
				if(updateTime_between1 != null){
					c.andUpdateTimeBetween(updateTime_between1,updateTime_between2);
				}
				if(updateTime_notBetween1 != null){
					c.andUpdateTimeNotBetween(updateTime_notBetween1,updateTime_notBetween2);
				}
			if(worVersionMap.get("orderBy")!=null){
				worVersionEx.setOrderByClause((String)worVersionMap.get("orderBy"));
			}
			if(limitStart != null && limitOffset != null){
				worVersionEx.setLimitStart(limitStart);
				worVersionEx.setLimitOffset(limitOffset);
			}
			
			return worVersionEx;
	}
}
